<?php
/*
 * 汽车的api调用
 * @author     Mark <zhaody901@126.com>
 * @copyright  Copyright (c) 2013 lemon team
 * @version    $Id: f86d48b74e6b7b35ca017cbaaf64ad2237673603 $
 * @time       14-2-7 上午10:16
 */
require 'config.inc.php';
require '../common.inc.php';

$param = array();
if (isset($pcid)) $cid = intval($pcid);
if (isset($pmid)) $mid = intval($pmid);
if (isset($pbid)) $bid = intval($pbid);
if (isset($psid)) $sid = intval($psid);
$action = $action?$action:$act;
$auto_info = new AutoInfo();
switch($action) {
	case 'getBrands':
		$result = $auto_info->getBrands($cid);
		echo $auto_info->getResult($auto_info->fullJS($result), AutoInfo::RETURN_JSON);
		break;
	case 'getModels':
		$result = $auto_info->getModels($cid, $bid);
		echo $auto_info->getResult($auto_info->fullJS($result), AutoInfo::RETURN_JSON);
		break;
	case 'getStyles':
		$result = $auto_info->getStyles($mid);
		echo $auto_info->getResult($auto_info->fullJS($result), AutoInfo::RETURN_JSON);
		break;
    case 'GetAutoList':
        $result = $auto_info->getAutoList();
		echo $auto_info->getResult($auto_info->fullJS($result), AutoInfo::RETURN_JSON);
        break;
}



